﻿@model Unijovem.UI.Models.EventoModel

@{
    ViewBag.Title = "Criar";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<script src="@Url.Content("~/Scripts/jquery.maskedinput-1.3.min.js")" type="text/javascript"></script>

<script language="javascript" type="text/javascript">
    $(document).ready(function () {
        $("#Data").mask("99/99/9999");
        $("#Hora").mask("99:99");
    });
</script>

<h2>Criar</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>EventoModel</legend>

         <div class="editor-label">
            @Html.LabelFor(model => model.IdCategoria)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.IdCategoria, (SelectList)ViewBag.Categorias)
            @Html.ValidationMessageFor(model => model.IdCategoria)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Data)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Data)
            @Html.ValidationMessageFor(model => model.Data)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Hora)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Hora)
            @Html.ValidationMessageFor(model => model.Hora)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Titulo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Titulo)
            @Html.ValidationMessageFor(model => model.Titulo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Descricao)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Descricao)
            @Html.ValidationMessageFor(model => model.Descricao)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.SetFlickr)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SetFlickr)
            @Html.ValidationMessageFor(model => model.SetFlickr)
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

